package com.example.androidmainshixun.entity;

import android.net.Uri;

public class NewsItem {
    private String title;      // 新闻标题
    private String url;        // 新闻详情页面的URL
    private int imageResourceId; // 图片资源 ID
    private Uri imageuri;
    private String publishDate;// 发布日期

    public NewsItem(String title,String url, Integer imageResourceId,Uri imguri, String publishDate) {
        this.title = title;
        this.url=url;
        this.imageResourceId = imageResourceId;
        this.imageuri=imguri;
        this.publishDate = publishDate;
    }


    public Uri getImageuri() {
        return imageuri;
    }



    public void setImageuri(Uri imageuri) {
        this.imageuri = imageuri;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public int getImageResourceId() {
        return imageResourceId;
    }

    public void setImageResourceId(int imageResourceId) {
        this.imageResourceId = imageResourceId;
    }

    public String getPublishDate() {
        return publishDate;
    }

    public void setPublishDate(String publishDate) {
        this.publishDate = publishDate;
    }
    @Override
    public String toString() {
        return "NewsItem{" +
                "title='" + title + '\'' +
                ", url='" + url + '\'' +
                ", imageResourceId=" + imageResourceId +
                ", imageuri=" + imageuri +
                ", publishDate='" + publishDate + '\'' +
                '}';
    }
}